Repository navigation
feat(inbox-sweep): --state makes repeated sweeps idempotent - #124
Merged
Merged
Conversation
`GET /notifications?all=true` also lists threads already marked done, and REST exposes no done state. Measured live on hyperpolymath/HOL: after a successful unsubscribe + mark-done, all five threads stayed in the listing unchanged, while the web inbox showed only the one open PR. Without memory, every hourly run would re-clear the same ~640 threads (~1300 REST writes against a shared 5000 budget). `--state <path>` records (thread id, updated_at) once both DELETEs returned 204, and is written atomically (temp file + rename). A thread whose updated_at is unchanged is skipped before any read or write. A thread with new activity, which GitHub returns to the inbox, is decided again. Entries for threads that are no longer listed are dropped. A missing file means empty state; a corrupt file is an error, because a silently empty state would re-clear everything. Tests: a second sweep using the saved state writes nothing; a bumped updated_at is re-cleared; stale entries are pruned; the state file round-trips and a corrupt one is refused. Mutant check: disabling the skip fails 2 of these tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0196aKTfvS6vPQVp2LPoXbjP
hyperpolymath
enabled auto-merge (squash)
October 1, 2026 14:49
Contributor
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
hyperpolymath
added a commit
that referenced
this pull request
Oct 1, 2026
Resolve crates/squabble-cli/src/main.rs as a union: main added `board`/`inbox-sweep` (exit 6, #123/#124) where this branch added `verify-satisfied` (exit 5, #119). Both modules, dispatch arms, usage lines and exit-code docs are kept; codes listed in numeric order. cargo fmt --check, clippy -D warnings and cargo test --workspace (279) pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W5CoaksP2Bg21HpDCgFgwS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #123.
Why
GET /notifications?all=truealso lists threads that are already done, and the REST notification object has no done field. I measured this live onhyperpolymath/HOL:inbox-sweep --apply --repo hyperpolymath/HOLcleared 4 of 4 due threads, and both DELETEs returned 204.true→ 404, while open PR chore(deps): bump the actions group with 4 updates #11 stayed subscribed.all=truestill listed all five threads unchanged three minutes later.Without memory, every hourly run would therefore re-clear the same ~640 threads: about 1300 REST writes against a 5000/h budget that other sessions share.
What
--state <path>stores{thread id: updated_at}:updated_atis unchanged is skipped before any GraphQL read or REST write.Evidence
just quality: exit 0, 310 passed, 0 failed.updated_atis re-cleared; stale entries are pruned; the state file round-trips and a corrupt one is refused.falsefails 2 of the new tests.🤖 Generated with Claude Code
https://claude.ai/code/session_0196aKTfvS6vPQVp2LPoXbjP